libname tax94 'path6';

proc sql;
select
count(*) as Total_records FORMAT COMMA20.,
SUM(CASE WHEN var45 IS NOT NULL THEN 1 ELSE 0 END) AS Total_tracts_assigned FORMAT COMMA20.,
SUM(CASE WHEN var46 IS NOT NULL AND var47 IS NOT NULL THEN 1 ELSE 0 END) AS Total_latlong_assigned FORMAT COMMA20.
from tax94.file16;
quit;